<!--suppress ALL -->
<html xmlns:pdf="https://github.com/xhtml2pdf/xhtml2pdf/blob/master/doc/usage.rst">

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style type="text/css">
        img {width: 50%; height: auto;}
    </style>
</head>
<body style="width: 100%;">
    <div style="background: {{ badgeForms.badge_image_url }}">
        {% for badgeFieldForm in badgeFieldForms %}
            {% if badgeFieldForm.custom_field == 'QR' %}
                <div id="badge_qr" style="text-align: center;
                    margin-top:{{badgeFieldForm.margin_top}}mm;
                    margin-bottom:{{badgeFieldForm.margin_bottom}}mm;
                    margin-left:{{badgeFieldForm.margin_left}}mm;
                    margin-right:{{badgeFieldForm.margin_right}}mm;">
                    <img src="data:image/png;base64, {{ badgeFieldForm.sample_text }}" alt="QR" />
                </div>
            {% else %}
                <p style="font-family: {{badgeFieldForm.font_name}};
                    font-size: {{badgeFieldForm.font_size}} px;
                    text-align: center;
                    text-transform: {{badgeFieldForm.text_type}};
                    font-weight: {{badgeFieldForm.font_weight}};
                    font-style: {{badgeFieldForm.font_style}};
                    text-decoration: {{badgeFieldForm.text_decoration}};
                    -webkit-transform: rotate({{badgeFieldForm.text_rotation}}deg);
                    -moz-transform: rotate({{badgeFieldForm.text_rotation}}deg);
                    -o-transform: rotate({{badgeFieldForm.text_rotation}}deg);
                    transform: rotate({{badgeFieldForm.text_rotation}}deg);
                    writing-mode: lr-tb;
                    margin-top:{{badgeFieldForm.margin_top}}mm;
                    margin-bottom:{{badgeFieldForm.margin_bottom}}mm;
                    margin-left:{{badgeFieldForm.margin_left}}mm;
                    margin-right:{{badgeFieldForm.margin_right}}mm;
                    color: {{badgeFieldForm.font_color}}">
                    {{ badgeFieldForm.sample_text }}
                </p>
            {% endif %}
        {% endfor %}
    </div>
</body>
</html>
